package com.dsg.service.oil;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dsg.entity.account.DsgAccountTrade;
import com.dsg.entity.bank.DsgBankDetail;
import com.dsg.entity.dto.RecentOilDto;
import com.dsg.entity.oil.DsgOilData;
import com.dsg.entity.oil.DsgOilDataDetail;
import com.dsg.service.apply.IDsglService;

import java.io.File;
import java.util.List;

/**
 * <p>
 * 入油数据明细 服务类
 * </p>
 *
 * @author system
 * @since 2020-07-02
 */
public interface IDsgOilDataDetailService extends IService<DsgOilDataDetail>, IDsglService<DsgOilDataDetail> {
    /**
     * 列出最近3個月的入油數據
     * @param ownsId
     * @param carNo
     * @return
     */
    List<RecentOilDto> selectRecent(String ownsId, String carNo);

    /**
     * 4个月内該carNo有使用过油咭加油
     * @param carNo
     * @return
     */
    Integer selectByCar(String carNo);

    /**
     * 上載
     * @param file
     * @param dsgOilData
     * @throws Exception
     */
    void importExcel(File file, DsgOilData dsgOilData) throws Exception;

    /**
     * 接受数据
     *
     * @param idList   主键
     * @param isAccept 1：接受 2：拒绝
     */
    void updateIsAccept(String idList, String isAccept);

    /**
     * 查詢需銀行過數入油數據
     *
     * @param dsgBankDetail
     * @return
     */
    List<DsgOilDataDetail> selectDsgBankOilDataDetail(DsgBankDetail dsgBankDetail);

    /**
     * 查询重复数据
     *
     * @param dsgOilDataDetail
     * @return
     */
    List<DsgOilDataDetail> selectRepeatList(DsgOilDataDetail dsgOilDataDetail);

    /**
     * 費用調整分頁查詢
     * @param page
     * @param dsgAccountTrade
     * @return
     */
    Page selectListAdj(Page page, DsgAccountTrade dsgAccountTrade);
}
